<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>


		<title>我的小麦铺</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link href="css/base.css" rel="stylesheet" type="text/css" />
		<link href="css/application_page.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="css/pro_dropdown_2.css" />
	   <script type="text/javascript">
	function changeTrColorMouseOver(obj){
		obj.bgColor="#f4f4f4";
	}
	
	function changeTrColorMouseOut(obj){
		obj.bgColor="white";
	}
	
	 
         function doQuery(pageno)
         {
           if(pageno<1 || pageno>${pagedOrder.totalPageNum})
           {
              alert("页号超出范围，有效范围：[1-${pagedOrder.totalPageNum}]!");
              ${'pageNo'}.select();
              return;
           }
           location.href='<c:url value="/goodMgr?act=orderList"/>&pageNo='+pageno;  
         }
</script>
	    <style type="text/css">
	    *{ padding:0px; margin:0px;}
body{ background:#fff; font-size:12px; font-family:"宋体"; color:#666666;}
a{ color:#666666; font-size:12px; font-family:"宋体"; text-decoration:none;}
a:hover{ color:#0a7cd4; font-size:12px; font-family:"宋体"; text-decoration:underline;}
ul,li,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,p{ list-style:none; margin:0px; padding:0px;}
h1,h2,p{ font-weight:normal; font-size:12px; margin:0px; padding:0px;}
input:focus{outline:none}
select:focus{outline:none;}
textarea:focus{outline:none;}
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, input, textarea, p, blockquote, th {margin:0px;padding:0px; }

table {border-collapse:collapse;border-spacing:0;}
img {border:0;}
address, caption, cite, code, dfn, em, th, var {font-style:normal;font-weight:normal;}
ol, ul {list-style:none;}
h1, h2, h3, h4, h5, h6 {font-size:100%;font-weight:normal;}
button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner {   border:none;  padding:-5px;}
	    
	    .box{ width:100%; margin:0 auto;}
.content{ width:1200px; margin:0 auto;}
.coupon{ width:1200px; float:left; padding-top:28px;}
.content{ width:1200px; margin:0 auto;}
.applyReturn{ width:1200px; float:left; padding-top:20px;}
.applyReturn_left{ width:196px; float:left;}
.applyReturn_right{ width:1004px; float:left;}
.applyright{width:964px; float:left; padding-left:40px;}

/*******************申请结果******************************/

.courht{width:964px; float:left; padding-left:40px;}
/*******************申请结果******************************/
.courht_text2{ width:964px; float:left; margin-top:25px;}
.table{ width:900px; height:32px; background:url(images/pu3.jpg) repeat-x left top; border:#e4e4e4 solid 1px; float:left;}
.table1{ width:962px; border-left:#efefef solid 1px;border-right:#efefef solid 1px; float:left;}
.table1 table td{border-bottom:#efefef solid 1px;}
.phlist{ padding-left:20px; float:left; padding-bottom:18px; padding-top:18px;}
.phlist h1{ float:left; padding-right:14px;}
.phlist h1 img{ width:57px; height:57px;border:#e0e0e0 solid 1px;}
.phlist h2{ float:left; width:220px; padding-top:12px; line-height:18px; color:#666px;}
.phlist h2 span{color:#666px; font-weight:bold}
.phlist_click{ width:61px; height:25px; text-align:center; background:url(../../../Images/images/pu17.jpg) no-repeat left top; margin:0 auto;}
.phlist_click h1{ width:16px; height:25px; float:left;}
.phlistbtn{ width:16px; height:25px; cursor:pointer; border:none; background: none;}
.phlistbtn1{ width:16px; height:25px; cursor:pointer; border:none; background: none;}
.phlist_click h2{ width:29px; height:25px; line-height:25px; text-align:center;  float:left;}
.phlistys{ color:#aaaaaa;}
/*******************共用的字体样式******************************/

.tableborder{ border-bottom:#dfddde solid 1px; font-size:12px; font-weight:bold; color:#727272; }
.tablefont{  font-size:12px;  color:#606060; }
.tablefont1{  font-size:12px; font-weight:bold; color:#727272; }

.courht_title{ width:964px; float:left; height:32px; border-bottom:#298fd7 solid 2px;}
.courht_title span{ float:left; text-align:center; font-size:18px; color:#1a8bdb; font-family:"微软雅黑"; line-height:28px; height:32px;background:url(../../../Images/images/a14.jpg) no-repeat center bottom;}

.courht_title1{ width:964px; float:left; height:32px; border-bottom:#298fd7 solid 2px; padding-top:25px; margin-bottom:15px;}
.courht_title1 h1{ float:left; text-align:center; font-size:18px; color:#1a8bdb; font-family:"微软雅黑"; line-height:28px; height:32px; background:url(../../../Images/images/a14.jpg) no-repeat center bottom; margin-right:10px; display:inline;}
.courht_title1 h2{ width:20px; float:left;  padding-top:10px;*padding-top:5px;_padding-top:5px;}
.courht_title1 h3{ float:left; padding-right:17px;  padding-top:10px;*padding-top:10px;_padding-top:10px;}
.applyReturn1{ width:964px; float:left; margin-top:13px; }
.applyReturnf1{ width:964px; float:left; margin-top:5px; }

.applyReturn1_title{ width:160px; float:left; text-align:right; line-height:22px; display:block; height:22px; padding-right:12px;}
.applyReturn1_title span{ color:#e01226;}
.applyReturn1_titlen1{ width:160px; float:left; text-align:right; line-height:30px; display:block; height:22px; padding-right:12px;}
.applyReturn1_titlen1 span{ color:#e01226;}
.applyReturn1_text{ width:700px; float:left; padding-left:6px;}
.applyReturn1textera{ width:457px; padding-left:10px; padding-top:5px; height:107px; overflow:hidden; text-align:left; border:#d9d9d9 solid 1px; color:#9f9f9f; line-height:22px; font-size:12px;}
.applyReturn1_text h1{ float:left; padding-right:7px;}
.applyReturn1_text h2{ float:left; padding-right:20px; line-height:22px;}
.applyReturn1_text h3{ float:left; color:#1f96f2;}
.applyReturn1_text h3 a{color:#1f96f2; text-decoration:none;}
.applyReturn1_text h3 a:hover{color:#1f96f2; text-decoration: underline;}
.applyReturn1_text h4{ float:left; padding-right:7px; padding-top:5px;*padding-top:0px;_padding-top:0px;}
.applyReturn2{ width:616px; float:left; margin-top:11px; padding-left:345px; }
.applyReturn2 h1{ float:left; padding-right:14px; line-height:24px;}
.applyReturn2 h2{ float:left;}
.applyReturn2btn{width:72px; height:24px; cursor:pointer; border:none; background:#2891e4; line-height:24px; text-align:center; color:#fff; font-family:"宋体"; font-size:12px;}
.applyReturn3{ width:648px; float:left; line-height:28px; text-align:right; color:#8e8e8e; }
.applyReturn1_text1{ width:700px; float:left; padding-left:6px; }
.applyReturn1_text1 h1{ float:left; padding-right:7px; padding-top:5px;*padding-top:0px;_padding-top:0px;}
.applyReturn1_text1 h2{ float:left; padding-right:20px;  padding-top:5px;}
.applyReturn1_text1 h3{ float:left; color:#1f96f2;  padding-top:5px;}
.applyReturn1_text1 h3 a{color:#1f96f2; text-decoration:none;}
.applyReturn1_text1 h3 a:hover{color:#1f96f2; text-decoration: underline;}
.applyReturn1_text1 h4{ float:left; color:#999999;  padding-top:5px;}
.applyReturn1_text2{ width:700px; float:left; padding-left:6px; }
.applyReturn1_text2 h1{  float:left; padding-right:14px; }
.applyReturn1_text2select{ width:109px; height:20px; border:#d9d9d9 solid 1px; background:#fff; line-height:18px; color:#666;  }
.applyReturn1_text2input{ width:355px; height:28px; border:#d9d9d9 solid 1px; background:#fff; line-height:28px; color:#666;  }
.applyReturn1_text2input1{ width:120px; height:28px; padding-left:5px; border:#d9d9d9 solid 1px; background:#fff; line-height:28px; color:#666;  }
.applyReturn1_text3{ width:700px; float:left; padding-left:6px;}
.applyReturn1_text3 h1{ float:left; padding-right:30px; }
.applyReturn1_text3 h2{ float:left; padding-right:8px; line-height:30px;}
.applyReturn1_text3 h2 span{ color:#e01226;}
.applyReturn2btn1{width:90px; height:29px; cursor:pointer; border:none; background:url(../../../Images/images/pu18.jpg) no-repeat left top; }
.applyReturn2btn2{width:90px; height:29px; cursor:pointer; border:none; background:url(../../../Images/images/pu19.jpg) no-repeat left top; }
.applyReturn1_text4{ width:700px; float:left; padding-left:6px; padding-top:10px;}
.applyReturn1_text4 h1{ float:left; padding-right:30px; }
.borde{ border-right:#f2f2f2 solid 1px;}
.bordefont{ font-family:Arial, Helvetica, sans-serif; padding-right:1px;}	    
	    
	    
	    
	    
	    </style>
	</head>
	<body>
		<div class="applyReturn_right">
			<div class="applyright">
				<div class="courht_title">
					<span>订单查询</span>
				</div>
		<div style="hight:20px;">&nbsp</div>
		
  	<c:if test="${not empty message}">
	  <script type="text/javascript">
	    alert(${message});
	  </script>
	</c:if>
	
	<div id="search">
	   <form action="<c:url value="/goodMgr?act=orderList"/>" method="post">
	     <span>下单日期:</span>
	     <select name="create_date">
	       <option value="">==请选择==</option>
	       <c:forEach var="date" items="${dateList}">
	         <option value="${date.createDate }" <c:if test="${date.createDate == param.create_date}">selected</c:if>>${date.createDate }</option>
	       </c:forEach>
	     </select>
	     <span>审核状态:</span>
	      <select name ="sign">
	       <option value="">=请选择=</option>
	       <option value="0" <c:if test="${param.sign==0}">selected</c:if>>已提交，未审核</option>
	       <option value="1" <c:if test="${param.sign==1}">selected</c:if>>已审核，未配货</option>
	       <option value="2" <c:if test="${param.sign==2}">selected</c:if>>已配货，未发货</option>
	       <option value="3" <c:if test="${param.sign==3}">selected</c:if>>已发货，未收货</option>
	       <option value="4" <c:if test="${param.sign==4}">selected</c:if>>已收货，交易成功</option>
	      </select>
	      <input type="submit" value=" 查 询 "/>	
	   </form>
	</div>
				<!--[if !IE]>订单列表<![endif]-->
				<input type="hidden" id="saleorderid" value="${saleOrder.id }" />
				<div class="courht_text2">
					<div class="table">
						<table width="940" border="0" cellspacing="0" cellpadding="0"
							align="center">
							<tr>
								
								<td width="100" height="32" align="center" valign="middle">&lt;订单号</td>
								<td width="60" height="32" align="center" valign="middle">收货人</td>
								<td width="60" height="32" align="center" valign="middle">付款方式</td>
								<td width="80" height="32" align="center" valign="middle">定单总金额</td>
								<td width="100" height="32" align="center" valign="middle">定单状态</td>
								<td width="100" height="32" align="center" valign="middle">下单时间</td>
								<td width="100" height="32" align="center" valign="middle">操作</td>
							</tr>
						</table>
					</div>
					<div class="table1">
						<table width="960" border="0" cellspacing="0" cellpadding="0"
							align="center">
							<!--[if !IE]>列表1<![endif]-->
							<input type="hidden" id="size" value="${size }" />
							 <c:if test="${not empty pagedOrder}">
			      <c:forEach items="${pagedOrder.pageContent}" var="order">
			  		<tr onMouseOver="changeTrColorMouseOver(this)" onMouseOut="changeTrColorMouseOut(this)">
			  			<td width="100"align="center" valign="middle">${order.orderNo}</td>
			  			<td width="60"align="center" valign="middle">${order.reallyName}</td>
			  			<td width="60"align="center" valign="middle">${order.setMony}</td>
			  			<td width="80"align="center" valign="middle">￥ ${order.orderAmount}</td>
			  			<c:choose>
			  				<c:when test="${order.sign==0}">
			  					<td width="100"align="center" valign="middle">已提交，未审核</td>
			  				</c:when>
			  				<c:when test="${order.sign==1}">
			  					<td width="100"align="center" valign="middle">已审核，未配货</td>
			  				</c:when>
			  				<c:when test="${order.sign==2}">
			  					<td width="100"align="center" valign="middle">已配货，未发货</td>
			  				</c:when>
			  				<c:when test="${order.sign==3}">
			  					<td width="100"align="center" valign="middle">已发货，未收货</td>
			  				</c:when>
			  				<c:when test="${order.sign==4}">
			  					<td width="100"align="right" valign="middle">已收货，交易成功</td>
			  				</c:when>
			  			</c:choose>
			  			
			  			<td width="100"align="center" valign="middle">${order.createDate }</td>
			  			
						<td width="100"align="center" valign="middle">
							<a href="<c:url value="/goodMgr?act=showDetail&orderNo=${order.orderNo}"/>" >
				  						查看明细
				  					</a>
			  			<c:choose>
			  				<c:when test="${order.sign==0}">
				  					<a href="<c:url value="/goodMgr?act=deleteOrder&orderNo=${order.orderNo}"/>">
				  						撤销
				  					</a>	
			  				</c:when>
			  				<c:when test="${order.sign==3}">
									<a href="<c:url value="/goodMgr?act=OK&orderNo=${order.orderNo}"/>">
					       				货已收到
					       			</a>
			  				</c:when>
			  			</c:choose>
						</td> 
					
			  		</tr>
			  		</c:forEach>
			  </c:if>
			  
			  <c:if test="${empty pagedOrder.pageContent}">
			  		<tr >
			  			<td colspan="8">您当前没有任何定单信息</td>
			  		</tr>
			  </c:if>
							<!--[if !IE]>列表1end<![endif]-->
						</table>
					</div>
			</div>
				<!--[if !IE]>列表结束<![endif]-->
				 <div id="pageinfo">
	            共${pagedOrder.totalRecNum}条, 当前显示${pagedOrder.startIndex}-${pagedOrder.endIndex}条 ${pagedOrder.pageNo}/${pagedOrder.totalPageNum}页
	           |
	           <c:if test="${pagedOrder.pageNo>1}">
	             <span class="linkspan" onclick="doQuery(1)">首页</span>&nbsp;
	           </c:if>
	           <c:if test="${pagedOrder.prePage}">
	             <IMG onclick="doQuery(${pagedOrder.pageNo-1});" title="上一页" src="<c:url value="/jsps/front/images/page_up_mouseover.gif" />">&nbsp;
	           </c:if>
	           <c:if test="${pagedOrder.nextPage}">
	              <IMG onclick="doQuery(${pagedOrder.pageNo+1});" title="下一页" src="<c:url value="/jsps/front/images/page_down.gif" />">&nbsp;
	           </c:if>
	           <c:if test="${pagedOrder.pageNo!=pagedOrder.totalPageNum}">
	             <span class="linkspan" onclick="doQuery(${pagedOrder.totalPageNum})">末页</span>&nbsp;
	           </c:if>
	           |
	            到<input type="text" id="pageNo" size=4 style="text-align:right;" onkeypress="onlynumber();"/> 页
	           <button onclick="doQuery(document.getElementById('pageNo').value);"> 跳 转 </button>		           		           	           	              
	   </div>
	</body>
</html>